package com.xiaobai.feign.follback;
import java.math.BigDecimal;

import com.xiaobai.feign.ProductFeignClient;
import com.xiaobai.product.bean.Product;
import org.springframework.stereotype.Component;

@Component
public class ProductFeignFallBackClient implements ProductFeignClient {
    @Override
    public Product getProductById(Long productId) {
        System.out.println("返回一个兜底。。。。");
        Product product = new Product();
        product.setProductId(productId);
        product.setPrice(new BigDecimal("0"));
        product.setProductName("无知商品");
        product.setNum(0);
        return product;
    }
}
